cmake_minimum_required(VERSION 2.6)
project(sqlcipher)

include_directories(.)
add_definitions(-DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2 -DSQLITE_THREADSAFE=1
 #-DSQLCIPHER_CRYPTO_OPENSSL
 -DSQLCIPHER_CRYPTO_WINCSP
  -DSQLITE_OS_WIN=1 -DSQLITE_OS_UNIX=0 -D_HAVE_SQLITE_CONFIG_H -DSQLITE_DEFAULT_PAGE_SIZE=4096)

add_executable(sqlcipher wherecode.c where.c walker.c wal.c vtab.c vdbetrace.c vdbesort.c vdbemem.c vdbeblob.c vdbeaux.c vdbeapi.c vdbe.c vacuum.c util.c utf.c update.c trigger.c treeview.c tokenize.c threads.c table.c status.c select.c rowset.c resolve.c random.c printf.c prepare.c pragma.c pcache1.c pcache.c pager.c os_win.c os_unix.c os.c notify.c mutex_w32.c mutex_unix.c mutex_noop.c mutex.c memjournal.c mem5.c mem3.c mem2.c mem1.c mem0.c main.c malloc.c loadext.c legacy.c journal.c insert.c hash.c global.c func.c fkey.c fault.c expr.c dbstat.c delete.c date.c ctime.c 
crypto_libtomcrypt.c crypto_impl.c crypto_cc.c crypto.c complete.c callback.c build.c btree.c btmutex.c bitvec.c backup.c auth.c attach.c analyze.c alter.c shell.c opcodes.c parse.c whereexpr.c
#crypto_openssl.c 
winbuild/crypto_wincsp.c
)

#target_link_libraries(sqlcipher pthread dl crypto)

install(TARGETS sqlcipher RUNTIME DESTINATION bin)
